<%= erb :header %>

<h1> Here is our menu: <br> </h1>
<menu>
<% @drinks.each do |drink| %>

    <a href="/drink/<%=drink["Key"]%>"> <%= drink["Name"] %></a>
    <%= drink["Description"] %><br>
    <% if drink["Ingredients"]["Ingredient"].is_a?(Hash) %>
        <% ingredient = drink["Ingredients"]["Ingredient"] %>
        <%= ingredient["Name"]  %> : <%=ingredient["Amount"]%>oz <br>
    <%else%>
        <% drink["Ingredients"]["Ingredient"].each do |ingredient| %>
            <%= ingredient["Name"]%> : <%=ingredient["Amount"]%>oz <br>
        <%end%>   
    <%end%>


<%end%>
</menu>

<%= erb :footer %>
